home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Supervisor's Toolkit
/
Network Supervisor's Toolkit.iso
/
btrieve
/
patch
/
bpt5157
/
patch515.bat
< prev
next >
Wrap
DOS Batch File
|
1996-07-10
|
3KB
|
153 lines
echo off
CLS
echo *** MAKE SURE THAT YOU USE THE ORIGINAL (UNPATCHED) RELEASED VERSION
echo OF THE PRODUCT YOU ARE PATCHING. PATCHING AN ALREADY PATCHED COPY
echo MAY CAUSE UNPREDICTABLE ERRORS.
echo
echo
IF %2! == ! GOTO PARAM
IF %2 == VAP GOTO TESTNEXT
IF %2 == vap GOTO TESTNEXT
IF %2 == NLM GOTO TESTNEXT
IF %2 == nlm GOTO TESTNEXT
GOTO PARAM
::
:TESTNEXT
IF %1! == ! GOTO PARAM
SET BTR_VER=515
IF %1 == BTRIEVE GOTO BTRIEVE
IF %1 == btrieve GOTO BTRIEVE
IF %1 == BCONSOLE GOTO BCONSOL
IF %1 == bconsole GOTO BCONSOL
IF %1 == BSERVER GOTO BTRIEVE
IF %1 == bserver GOTO BTRIEVE
IF %1 == BROUTER GOTO BROUTER
IF %1 == brouter GOTO BROUTER
IF %1 == BREQUEST GOTO BREQUES
IF %1 == brequest GOTO BREQUES
IF %1 == BTRCALLS GOTO BTRCALL
IF %1 == btrcalls GOTO BTRCALL
GOTO PARAM
::
:BTRIEVE
SET BTR_FILE=%1.%2
SET BTR_ORG=%1.ORG
SET BTR_PAT=BPAT%2.515
IF %2 == NLM GOTO NEXTBTR
IF %2 == nlm GOTO NEXTBTR
IF %1 == BTRIEVE GOTO NOTVAP
IF %1 == btrieve GOTO NOTVAP
GOTO PATCH
::
:NEXTBTR
IF %1 == BSERVER GOTO NOTNLM
IF %1 == bserver GOTO NOTNLM
GOTO PATCH
::
:BCONSOL
IF %2 == VAP GOTO NOTVAP
IF %2 == vap GOTO NOTVAP
SET BTR_FILE=%1.%2
SET BTR_ORG=%1.ORG
SET BTR_PAT=BPATCON.515
GOTO PATCH
::
:BROUTER
SET BTR_FILE=%1.%2
SET BTR_ORG=%1N.ORG
SET BTR_PAT=BPATRTRN.515
IF %2 == NLM GOTO PATCH
IF %2 == nlm GOTO PATCH
SET BTR_ORG=%1V.ORG
SET BTR_PAT=BPATRTRV.515
GOTO PATCH
::
:BREQUES
SET BTR_FILE=%1.EXE
SET BTR_ORG=%1.ORG
SET BTR_PAT=BPATREQ.516
SET BTR_VER=516
GOTO PATCH
::
:BTRCALL
SET BTR_FILE=%1.DLL
SET BTR_ORG=%1.ORG
SET BTR_PAT=BPATREQO.517
SET BTR_VER=517
GOTO PATCH
::
:PATCH
IF NOT EXIST PI.EXE GOTO NOPI
IF NOT EXIST %BTR_PAT% GOTO NOPAT
IF NOT EXIST %BTR_FILE% GOTO NOFILE
IF NOT EXIST %BTR_ORG% REN %BTR_FILE% %BTR_ORG%
IF EXIST %BTR_FILE% DEL %BTR_FILE%
:INPATCH
echo
echo %BTR_FILE% VERSION %BTR_VER% ** PATCHING .............
echo
COPY %BTR_ORG% %1
PI %1 %BTR_PAT%
REN %1 %BTR_FILE%
GOTO FIXDONE
::
:NOPAT
echo
echo CANNOT FIND %BTR_PAT%
GOTO END
::
:NOPI
echo
echo CANNOT FIND PI.EXE
echo
echo The Novell Patch Install Utility (PI.EXE) is required to install
echo the patches for this product. Please copy PI.EXE to the directory
echo you are working in............................................
GOTO END
::
:NOFILE
IF EXIST %BTR_ORG% GOTO INPATCH
echo
echo CANNOT FIND %BTR_FILE%
GOTO END
::
:NOTVAP
echo
echo %1 IS ONLY FOR THE NLM PRODUCTS
GOTO END
::
:NOTNLM
echo
echo %1 IS ONLY FOR THE VAP PRODUCTS
GOTO END
::
:PARAM
echo
echo THE FORMAT IS:
echo
echo PATCH515 [filename] [type]
echo
echo WHERE [filename] IS: BTRIEVE { NLM }
echo BCONSOLE { NLM }
echo BSERVER { VAP }
echo BROUTER { VAP & NLM }
echo BREQUEST { VAP & NLM }
echo BTRCALLS { VAP & NLM }
echo
echo AND [type] IS: VAP
echo NLM
echo
echo
GOTO END
::
:FIXDONE
echo
echo BTRIEVE PRODUCT FOR %2 VERSION %BTR_VER% ** PATCH COMPLETE **
echo
::
:END
SET BTR_FILE=
SET BTR_ORG=
SET BTR_PAT=
SET BTR_VER=